<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <style>
        .a {
            /* width: 20px; */
        }
    </style>

    <script>

        let arr = ['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f']
        let rcolor = '#'
        let num

        for(let i = 0; i<6; i++){
            num = Math.floor(Math.random() * arr.length)
            rcolor += arr[num]
        }

        document.write(`<div style="width:100px;height:100px;background-color:${rcolor}" ></div>`)

        reg = /^(?:[\u4e00-\u9fa5·]{2,16})$/


    </script>
</body>
</html>